<template>
  <view class="buk-flight-card FlightListCard_commonCard">
    <view class="FlightListCard_commonCardBox FlightListCard_pTop">
      <view class="CommonCardTag_card-top-left-tag">
        <span class="CommonCardTag_tagText">特惠航班</span>
      </view>
      <view class="FlightListCard_CardContentBox">
        <view class="FlightListCard_CardContentContainer">
          <view class="FlightListCard_CardContentContainer FlightListCard_CardContentDiv">
            <view class="FlightListCard_flight-info-left" style="flex: 0 1 0%;">
              <view class="FlightListCard_flight-logo-container">
                <view class="FlightListCard_img-box">
                  <picture>
                    <source
                      :srcset="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/32/`+ flightInfo.carrier+ `.png_.webp`">
                    <img
                      :src="`https://static.tripcdn.com/packages/flight/airline-logo/latest/airline/32/` + flightInfo.carrier + `png`"
                      class="f-taro-img__content f-taro-img__scale-to-fill">
                  </picture>

                </view>
              </view>
              <div class="FlightListCard_flight-info-top">
                <div class="col ListCardTime_Container">
                  <view class="ListCardTime_time">{{ flightInfo.dtime }}</view>
                  <div class="ListCardTime_Name">{{ flightInfo.dportName }}{{ flightInfo.dterm }}
                  </div>
                </div>
                <div class="xtaro-xview col align-self-center text-center FlightListCard_stopTransit">
                  <div class="f-taro-img TransitLineArrow_new-line-arrow">
                    <picture>
                      <source srcset="https://pages.c-ctrip.com/flight_h5/tinyapp/domMiddle/direct_arrow.png_.webp">
                      <img src="https://pages.c-ctrip.com/flight_h5/tinyapp/domMiddle/direct_arrow.png"
                        class="f-taro-img__content f-taro-img__scale-to-fill">
                    </picture>
                  </div>
                </div>
                <div class="xtaro-xview col ListCardTime_Container">
                  <div class="xtaro-xview ListCardTime_time">
                    <div class="xtaro-xview ListCardTime_time-plus">{{ flightInfo.ddate }} 周日</div>
                    {{ flightInfo.atime }}
                  </div>
                  <div class="xtaro-xview ListCardTime_Name">{{ flightInfo.aportName }}{{ flightInfo.aterm }}
                  </div>
                </div>
              </div>
            </view>
            <view class="col text-right FlightListCard_price-box">
              <view class="flex-middle right PriceComponent_price-box">
                <view class="PriceComponent_price-div">
                  <span class="PriceComponent_currency-symbol">¥</span>
                  <span class="PriceComponent_price">
                    {{ flightInfo.lowestPrice.price }}
                  </span>
                </view>
              </view>
              <view class="FlightListCard_price-sub-title">
                <view class="FlightListCard_flight-info-right-tag">
                  <view class="FlightListCard_item-content FlightListCard_tags-box">
                    <view class="FlightListCard_trip-tag FlightListCard_discountLabel">已优惠￥125
                    </view>
                  </view>
                </view>
              </view>

            </view>
          </view>
          <div class="" style="height: 0px; width: 100%;"></div>
          
          <div class="FlightListCard_tripTagContainer">
            <div class="col FlightListCard_tripTagBox">
              <div class="FlightListCard_airlineBox FlightListCard_displayStyle">
                <div class="FlightListCard_item-content">{{ flightInfo.carrierName }} {{ flightInfo.flightNo }}</div>
              </div>
              <div class="FlightListCard_airlineBox FlightListCard_boxContainer">
                <div class="FlightListCard_separateLine"></div>
                <div class="FlightListCard_item-content airline-craft">中机型</div>
              </div>
              <div class="FlightListCard_airlineBox">
                <div class="FlightListCard_separateLine"></div>
              </div>
              <div class="FlightListCard_airlineBox">
                <div class="FlightListCard_item-content">无餐食</div>
              </div>
            </div>
          </div>
         

        </view>
      </view>
    </view>
  </view>

</template>

<script setup>
  const props = defineProps({
    flightInfo: {}
  });
</script>

<style lang="scss" scoped>
  /*卡片视图 */
  .buk-flight-card {
    // background: #fff;
    // border-radius: 8px;
    // margin: 5px 0;
    position: relative;
    //border: 3px black solid;
    /* box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, .3); */
  }

  .FlightListCard_commonCard {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    background-color: #fff;
    // border-style: none;
    border-radius: 8px;
    position: relative;
    overflow-wrap: break-word;
    margin-top: 8px;
  }

  .FlightListCard_commonCardBox {
    -webkit-flex: 1 1 auto;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding: 12px;
    width: 100%;
  }


  .FlightListCard_pTop {
    padding-top: 24px;
  }

  .FlightListCard_CardContentBox {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
    //border: 2px blue dotted;
  }


  .FlightListCard_CardContentContainer {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
    width: 100%;
    //border: 2px green dotted;
  }


  .FlightListCard_CardContentDiv {
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
  }




  .FlightListCard_flight-info-left {
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    min-width: 65%;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    //border: 2px red dotted;
  }

  .FlightListCard_flight-info-left,
  .FlightListCard_flight-logo-container {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
  }


  .FlightListCard_img-box {
    // width: .85333rem;
    width: 5rem;
    // height: .85333rem;
    height: 5rem;
    // overflow: hidden;
    display: inline-block;
  }

  .f-taro-img {
    overflow: hidden;
    display: inline-block;
    width: 300px;
    height: 225px
  }

  .f-taro-img__content {
    height: 100%;
    width: 100%;
    display: flex;
    background-repeat: no-repeat;
    background-size: contain
  }

  .f-taro-img__scale-to-fill {
    background-size: 100% 100%;
    background-position: 0 0
  }

  .f-taro-img__aspect-fit {
    background-size: contain;
    background-position: 50%
  }

  .f-taro-img__aspect-fill {
    background-size: cover;
    background-position: 50%
  }

  .f-taro-img__height-fix,
  .f-taro-img__width-fix {
    background-size: 100% 100%;
    background-position: 0 0
  }

  .f-taro-img__top {
    background-position: top
  }

  .f-taro-img__bottom {
    background-position: bottom
  }






  .col {
    -webkit-flex-basis: 0;
    -ms-flex-preferred-size: 0;
    flex-basis: 0;
    -webkit-flex-grow: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    max-width: 100%;
  }

  .text-right {
    text-align: right !important;
  }


  .FlightListCard_price-box {
    height: 24px;
  }

  .flex-middle,
  .flex-middle.right {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center
  }

  .flex-middle.right {
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end
  }

  .flex-middle.center {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center
  }


  .FlightListCard_flight-logo-container {
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 20px;
    height: 20px;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
  }

  .f-taro-img {
    overflow: hidden;
    display: inline-block;
    width: 300px;
    height: 225px;
  }

  .FlightListCard_img-box {
    width: 20px;
    height: 20px;
  }


  .FlightListCard_flight-info-top {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    margin-left: .34133rem
  }


  .ListCardTime_Container {
    white-space: nowrap
  }

  .ListCardTime_listCardStyle {
    min-width: 2.47467rem
  }

  .ListCardTime_Name {
    font-size: 16px;
    line-height: 18px;
    color: #111;
    white-space: nowrap
  }

  .ListCardTime_isNewAirport {
    color: #f70
  }

  .ListCardTime_time {
    color: #111;
    font-size: 24px;
    line-height: 24px;
    font-weight: 800;
    letter-spacing: 0.4px;
    position: relative
  }

  .ListCardTime_time-plus {
    left: 0;
    top: -10px;
  }

  .ListCardTime_right-time-plus,
  .ListCardTime_time-plus {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 15px;
    text-align: left;
    position: absolute;
    white-space: nowrap
  }

  .ListCardTime_right-time-plus {
    right: -.85333rem;
    top: .10667rem
  }

  .FlightListCard_stopTransit {
    position: relative;
    margin: 8px 16px
  }

  .TransitLineArrow_new-line-arrow {
    position: relative;
    width: 2.38933rem;
    height: .256rem
  }

  .TransitLineArrow_middle-text,
  .TransitLineArrow_new-line-arrow {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center
  }


  .PriceComponent_price-box {
    height: 24px
  }

  .PriceComponent_price-div {
    margin-left: 6px;
  }

  .PriceComponent_currency-symbol {
    color: #006ff6;
    font-size: 12px;
    font-weight: 500
  }

  .PriceComponent_price {
    color: #006ff6;
    font-size: 20px;
    height: 24px;
    font-weight: 500;
    letter-spacing: 0.38px;
  }

  .FlightListCard_price-sub-title {
    color: #999;
    font-size: 12px;
    margin-top: 2px;
  }

  .CommonCardTag_card-top-left-tag {
    position: absolute;
    top: 0;
    left: 0;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    border-radius: 8px 0 8px 0;
    height: 16px;
    background-color: #f0faf7;
    padding-left: 8px;
    padding-right: 10px;
  }

  .CommonCardTag_tagText {
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: #00b780;
    font-weight: 500
  }

  .FlightListCard_displayStyle,
  .FlightListCard_tripTagContainer {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row
  }

  .FlightListCard_tripTagContainer {
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
    width: 100%
  }

  .FlightListCard_flight-info-right-tag {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap
  }

  .FlightListCard_tripTagBox {
    color: #999;
    padding: 8px 0 0 28px;
    justify-items: stretch;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap
  }

  .FlightListCard_airlineInfo,
  .FlightListCard_tripTagBox {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    font-size: 12px;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center
  }

  .FlightListCard_flight-info-right-tag {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap
  }

  .FlightListCard_tags-box {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-align-items: flex-end;
    -ms-flex-align: end;
    align-items: flex-end
  }


  .FlightListCard_trip-tag {
    background: #fff;
    border-radius: 2px;
    border: 1px solid #8dd9be;
    color: #08a66f;
    font-size: 10px;
    padding: 1.5px 2px;
    margin-left: 1px;
    line-height: 11px;
  }

  .FlightListCard_discountLabel {
    color: #00b87a;
    border: 1px solid #bfeddd
  }

  .FlightListCard_displayStyle {
    -webkit-align-items:center;
    -ms-flex-align:center;
    align-items:center
  }
  .FlightListCard_displayStyle,
  .FlightListCard_tripTagContainer {
    display:-webkit-flex;
    display:-ms-flexbox;
    display:flex;
    -webkit-flex-direction:row;
    -ms-flex-direction:row;
    flex-direction:row
  }

  .FlightListCard_airlineBox {
    line-height: 15px;
    font-size: 12px;
  }

  .FlightListCard_boxContainer {
    display:-webkit-flex;
    display:-ms-flexbox;
    display:flex;
    -webkit-flex-direction:row;
    -ms-flex-direction:row;
    flex-direction:row;
    -webkit-justify-content:flex-start;
    -ms-flex-pack:start;
    justify-content:flex-start;
    -webkit-align-items:center;
    -ms-flex-align:center;
    align-items:center
  }

  .FlightListCard_separateLine {
    background-color:#ccc;
    height: 9px;
    min-height: 9px;
    width: 0.5px;
    margin: 0 4px;
  }

  .FlightListCard_item-content {
    min-height: 15px;
    max-height: 30px;
    line-height: 15px;
  }
</style>